<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>简单的地图加载</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
	<div id="map"></div>

    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCqsn1M2pSssz9OrldUVHP4ELTDToelVYw" defer></script>
	<script>
		let lattxt = 38.9145442;  // 经度
		let lngtxt = 121.6140788; // 维度

		function initMap() {
			new google.maps.Map(document.getElementById('map'), {
				center: {
					lat: lattxt,
					lng: lngtxt
				},
				zoom: 12 // 数字越大，高度越低
			});
		}

		window.onload = function(){
    		initMap();
		}
	</script>
</body>
</html>